<html>
  <head>
    <title>Edit User</title>
    <script language="JavaScript" SRC="config.js"></script>
   	<script src="./lib/jquery.js" ></script>
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="./lib/jquery.mobile-1.1.1.min.css" />
	<script src="./lib/jquery-1.7.1.min.js"></script>
	<script src="./lib/jquery.mobile-1.1.1.min.js"></script>
	<script type="text/javascript" charset="utf-8">
	 var query = window.location.search;
  // Skip the leading ?, which should always be there, 
  // but be careful anyway
  if (query.substring(0, 1) == '?') {
    query = query.substring(1);
  }
  var data = query.split('?'); 
   alert(data[0]);
  for (i = 0; (i < data.length); i++) {
    data[i] = unescape(data[i]);
    data[i]=data[i].replace('userid=','');
  }

 function get(){
	 var form=document.forms["form"];
 		 alert("get is called");
 		 var approve='0',verified='0',enable='0';
 		if(form.c1.checked==true) approve='1';
 		if(form.c2.checked==true) verified='1';
 		if(form.c3.checked==true) enable='1';
 			
 			 alert("approve="+approve+" verified="+verified+" enable="+enable);
	        $.post('http://'+serverip+'/socialengine/mobileservice/edituser/ApproveVerifiedEnable', {userid:data[0],userapproved:approve,userverified:verified,userenabled:enable},
	            function(output){
	               alert(output.result);
	            },"json");
	 		
    };
    </script>
  </head>
<body>

<div data-role="page" id="header">
<div data-role="header">
<a href="index.html" data-role="button" data-icon="home" data-iconpos="notext" rel="external">Home</a>
<h1>Edit User</h1>
</div>
<div data-role="content">
	  <form id="form">	

		<fieldset data-role="controlgroup">
    		<legend>Check checkbox bellow:</legend>
  			<input type="checkbox" name="genre" id="c1" />
         	<label for="c1"data-theme="c">Approve</label>

         	<input type="checkbox" name="genre" id="c2" />
         	<label for="c2" data-theme="c">Verified</label>

         	<input type="checkbox" name="genre" id="c3" />
         	<label for="c3" data-theme="c"> Enabled</label>
	    </fieldset>
	    <input type="button" value="Save Changes" onClick="get();">
	  </form>			 			 		 			 
	</div>
<div data-role="footer">
<h4>Footer</h4>

</div>
</body>
</html>